package com.codeman.business.book.domain;

import com.codeman.common.annotation.Excel;
import com.codeman.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 小说类别对象 book_category
 * 
 * @author codeman
 * @date 2021-03-18
 */
@Data
public class BookCategory
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private int id;

    /** 作品方向，0：男频，1：女频' */
    @Excel(name = "作品方向，0：男频，1：女频'")
    private String workDirection;

    /** 分类名 */
    @Excel(name = "分类名")
    private String name;

    /** 排序 */
    @Excel(name = "排序")
    private Long sort;

    private String createBy;

    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("workDirection", getWorkDirection())
            .append("name", getName())
            .append("sort", getSort())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
